#FROM registry-vpc.cn-shanghai.aliyuncs.com/mom2_base/nginx:1.17.5
FROM hub.registry.comac.intra/nginx:latest

ENV LANG C.UTF-8
ENV TZ Asia/Shanghai
#ENV RUN_GROUP nginx
#ENV DATA_DIR /home/www/dist
# 指定项目根目录下的nginx的配置覆盖默认配置
#RUN rm /etc/nginx/conf.d/default.conf

ADD nginx.config.template /etc/nginx/nginx.conf
#ADD nginx.conf /etc/nginx/nginx.conf
#ADD nginx.conf /etc/nginx/conf.d/default.conf
# ADD proxy.conf /etc/nginx/conf.d/proxy.conf
# 复制源码到容器的/home目录
#COPY ./dist /home/www
#ADD ./dist/ /usr/share/nginx/html
ADD ./dist/ /usr/share/nginx/html

# 指定执行的工作目录
#WORKDIR /home/www

# 以实际nginx配置为主
EXPOSE 80

#RUN mkdir /root/app-logs && ln -s /var/log/nginx/access.log /root/app-logs/portal.log
# CMD 运行以下命令
CMD ["nginx", "-g", "daemon off;"]
